package com.example.backend.Config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class Config {
    @Value("${spring.application.name}")
    private String appName;
    @Value("${spring.datasource.url}")
    private  String dbUrl;
    @Value("${spring.datasource.username}")
    private  String dbUsername;
    @Value("${spring.datasource.password}")
    private String dbPassword;
    @Value("${server.port}")
    private String serverPort;
    @Bean
    public String getAppName() {
        return appName;
    }
    @Bean
    public String getDbUrl() {
        return dbUrl;
    }
    @Bean
    public String getDbUsername() {
        return dbUsername;
    }
    @Bean
    public String getDbPassword() {
        return dbPassword;
    }
    @Bean
    public String getServerPort() {
        return serverPort;
    }


}
